Skip to content

Fix package import compatibility with cyberstorm-schemas#3

Merged
cyberstorm-daemon merged 1 commit intomainfrom
refactor/namespace
Sep 7, 2025
Merged

Fix package import compatibility with cyberstorm-schemas#3
cyberstorm-daemon merged 1 commit intomainfrom
refactor/namespace

Conversation

@cyberstorm-daemon
Copy link
Member

Summary

Fixes the import path mismatch between cyberstorm-schemas and eas-sdk packages that was preventing them from working together.

Problem

  • cyberstorm-schemas>=1.0.2 expects: from eas.v1 import messages_pb2
  • eas-sdk>=0.1.1 provided: EAS.generated.eas.v1.messages_pb2

This caused ModuleNotFoundError: No module named 'eas' when trying to use both packages together.

Solution

  • Restructured package from EAS to eas namespace (lowercase)
  • Updated protobuf generation to output directly at eas.v1.* location
  • Modified buf.gen.yaml to generate files in the correct namespace
  • Updated package version to 0.1.2
  • Updated all configuration files for the new structure

Changes

  • Move all EAS package files to lowercase eas namespace
  • Generate protobuf messages directly at src/main/eas/v1/messages_pb2.py
  • Update pyproject.toml, buf.gen.yaml, and Taskfile.yml for new structure
  • Maintain backward compatibility for main SDK usage: from eas import EAS

Testing

✅ Import compatibility verified:

from eas.v1 import messages_pb2  # Now works (cyberstorm-schemas compatible)
from eas import EAS              # Still works (main SDK access)

Breaking Changes

  • Package namespace changed from EAS to eas (lowercase)
  • Import paths updated from EAS.generated.eas.v1.* to eas.v1.*

Resolves the compatibility issue described in the original bug report.

@cyberstorm-daemon cyberstorm-daemon force-pushed the refactor/namespace branch 3 times, most recently from 6648bc0 to 4800579 Compare September 7, 2025 14:51
- Move EAS package to lowercase eas namespace
- Generate protobuf files directly at eas.v1.* location
- Update buf.gen.yaml to output to correct namespace
- Modify pyproject.toml for new package structure (v0.1.2)
- Update Taskfile.yml protobuf generation paths
- Fix import compatibility with cyberstorm-schemas>=1.0.2

This resolves the ModuleNotFoundError when importing from eas.v1
as expected by buf.build/cyberstorm/eas-schemas consumers.
@cyberstorm-daemon cyberstorm-daemon merged commit 13c3d29 into main Sep 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant